package week2;

import java.util.Scanner;

public class PP0209{
  public static void main(String[] args) {
    double hour, min, s;

    Scanner t = new Scanner(System.in);
    s = t.nextInt();
    hour = Math.floor(s / 3600);
    s -= hour * 3600;
    min = Math.floor(s / 60);
    s -= min * 60;
    System.out.println(hour + "hour" + min + "min" + s + "s");
  }}
